---
layout: m1x_soap
title: Media Info
---

<h2><a name="catalog_product_attribute_media.info-Module%3AMageCatalog"></a>Module: Mage_Catalog</h2>


<h4><a name="catalog_product_attribute_media.info-Resource%3Acatalogproductattributemedia"></a>Resource:catalog_product_attribute_media</h4>

<p><b>Aliases:</b></p>
<ul>
	<li>product_attribute_media</li>
	<li>product_media</li>
</ul>


<h4><a name="catalog_product_attribute_media.info-Method%3A"></a>Method:</h4>

<ul>
	<li>catalog_product_attribute_media.info (SOAP V1)</li>
	<li>catalogProductAttributeMediaInfo (SOAP V2)</li>
</ul>


<p>Allows you to retrieve information about the specified product image.</p>

<p><b>Aliases:</b></p>
<ul>
	<li>product_attribute_media.info</li>
	<li>product_media.info</li>
</ul>



<p><b>Arguments:</b></p>

<table><tbody>
<tr>
<th> Type </th>
<th> Name </th>
<th> Description </th>
</tr>
<tr>
<td> string </td>
<td> sessionId <br class="atl-forced-newline" /> </td>
<td> Session ID </td>
</tr>
<tr>
<td> string <br class="atl-forced-newline" /> </td>
<td> product\productId <br class="atl-forced-newline" /> </td>
<td> Product ID or SKU </td>
</tr>
<tr>
<td> string <br class="atl-forced-newline" /> </td>
<td> file <br class="atl-forced-newline" /> </td>
<td> Name of the image file (e.g., /b/l/blackberry8100_2.jpg) </td>
</tr>
<tr>
<td> string <br class="atl-forced-newline" /> </td>
<td> storeView <br class="atl-forced-newline" /> </td>
<td> Store view ID or code (optional) </td>
</tr>
<tr>
<td> string </td>
<td> identifierType </td>
<td> Defines whether the product ID or SKU is passed in the 'product' parameter </td>
</tr>
</tbody></table>


<p><b>Returns</b>:</p>

<table><tbody>
<tr>
<th> Type </th>
<th> Name </th>
<th> Description </th>
</tr>
<tr>
<td> array </td>
<td> result </td>
<td> Array of catalogProductImageEntity </td>
</tr>
</tbody></table>



<p>The <b>catalogProductImageEntity</b> content is as follows:</p>

<table><tbody>
<tr>
<th> Type </th>
<th> Name </th>
<th> Description </th>
</tr>
<tr>
<td> string </td>
<td> file <br class="atl-forced-newline" /> </td>
<td> Image file name </td>
</tr>
<tr>
<td> string <br class="atl-forced-newline" /> </td>
<td> label <br class="atl-forced-newline" /> </td>
<td> Image file label </td>
</tr>
<tr>
<td> string <br class="atl-forced-newline" /> </td>
<td> position <br class="atl-forced-newline" /> </td>
<td> Image file position </td>
</tr>
<tr>
<td> string <br class="atl-forced-newline" /> </td>
<td> exclude <br class="atl-forced-newline" /> </td>
<td> Defines whether the image will associate only to one of three image types </td>
</tr>
<tr>
<td> string <br class="atl-forced-newline" /> </td>
<td> url <br class="atl-forced-newline" /> </td>
<td> Image URL </td>
</tr>
<tr>
<td> ArrayOfString </td>
<td> types <br class="atl-forced-newline" /> </td>
<td> Array of types </td>
</tr>
</tbody></table>


<h4><a name="catalog_product_attribute_media.info-Examples"></a>Examples</h4>

<h5><a name="catalog_product_attribute_media.info-RequestExampleSOAPV1"></a>Request Example SOAP V1</h5>

<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<div>
		<pre class="theme: Default; brush: php; gutter: false">$client = new SoapClient('http://magentohost/api/soap/?wsdl');

// If somestuff requires API authentication,
// then get a session token
$session = $client-&gt;login('apiUser', 'apiKey');

$result = $client-&gt;call($session, 'catalog_product_attribute_media.info', array('product' =&gt; '2', 'file' =&gt; '/b/l/blackberry8100_2.jpg'));
var_dump ($result);

// If you don't need the session anymore
//$client-&gt;endSession($session);</pre>
		</div>
</div></div>


<h5><a name="catalog_product_attribute_media.info-RequestExampleSOAPV2"></a>Request Example SOAP V2</h5>

<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<div>
		<pre class="theme: Default; brush: php; gutter: false">$proxy = new SoapClient('http://magentohost/api/v2_soap/?wsdl'); // TODO : change url
$sessionId = $proxy-&gt;login('apiUser', 'apiKey'); // TODO : change login and pwd if necessary

$result = $proxy-&gt;catalogProductAttributeMediaInfo($sessionId, '2', '/b/l/blackberry8100_2.jpg');
var_dump($result);</pre>
		</div>
</div></div>


<h5><a name="catalog_product_attribute_media.info-RequestExampleSOAPV2%28WSIComplianceMode%29"></a>Request Example SOAP V2 (WS-I Compliance Mode)</h5>

<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<div>
		<pre class="theme: Default; brush: php; gutter: false">$proxy = new SoapClient('http://magentohost/api/v2_soap/?wsdl');

$sessionId = $proxy-&gt;login((object)array('username' =&gt; 'apiUser', 'apiKey' =&gt; 'apiKey'));

$result = $proxy-&gt;catalogProductAttributeMediaInfo((object)array('sessionId' =&gt; $sessionId-&gt;result, 'productId' =&gt; '1', 'file' =&gt; '/i/m/image.png'));

var_dump($result-&gt;result);</pre>
		</div>
</div></div>


<h5><a name="catalog_product_attribute_media.info-ResponseExampleSOAPV1"></a>Response Example SOAP V1</h5>

<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<div>
		<pre class="theme: Default; brush: java; gutter: false">array
  'file' =&gt; string '/b/l/blackberry8100_2.jpg' (length=25)
  'label' =&gt; string '' (length=0)
  'position' =&gt; string '1' (length=1)
  'exclude' =&gt; string '0' (length=1)
  'url' =&gt; string 'http://magentohost/media/catalog/product/b/l/blackberry8100_2.jpg' (length=71)
  'types' =&gt;
    array
      0 =&gt; string 'image' (length=5)
      1 =&gt; string 'small_image' (length=11)
      2 =&gt; string 'thumbnail' (length=9)</pre>
		</div>
</div></div>


